using BITS.PreCompiler.CSharp.Visitors;
using Roslyn.Compilers.CSharp;

namespace BITS.PreCompiler.CSharp
{
    /// <summary>
    /// 
    /// </summary>
    /// <typeparam name="TSelf"> </typeparam>
    /// <typeparam name="TSyntaxNode">The type of the syntax node.</typeparam>
    public interface IBaseSyntaxNode<TSelf, out TSyntaxNode> : IBaseSyntaxNode<TSyntaxNode>, IVisitable<TSelf>
        where TSelf : IBaseSyntaxNode<TSelf, TSyntaxNode>
        where TSyntaxNode : SyntaxNode { }

    /// <summary>
    /// 
    /// </summary>
    /// <typeparam name="TSyntaxNode">The type of the syntax node.</typeparam>
    public interface IBaseSyntaxNode<out TSyntaxNode> : IBaseSyntaxNode
        where TSyntaxNode : SyntaxNode
    {
        /// <summary>
        /// Gets the syntax node.
        /// </summary>
        /// <returns></returns>
        new TSyntaxNode GetSyntaxNode();
    }

    /// <summary>
    /// 
    /// </summary>
    public interface IBaseSyntaxNode
    {
        /// <summary>
        /// Gets the parent.
        /// </summary>
        IBaseSyntaxNode Parent { get; }

        /// <summary>
        /// Gets the syntax node.
        /// </summary>
        /// <returns></returns>
        SyntaxNode GetSyntaxNode();
    }
}